home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / o-z / pdbase / install / install < prev   
Encoding:
Text File  |  1995-04-30  |  4.7 KB  |  153 lines

  1. ;
  2. ; $RCSfile: Install,v $
  3. ; $Date: 1995/02/07 22:21:22 $
  4. ; $Revision: 30.3 $
  5. ;
  6. ; PDBase Installer Script
  7. ;
  8. ; All rights reserved.
  9. ; Copyright © 1994,95 Jérome Souquières.
  10. ;
  11.  
  12. ;--- set default parameters ---
  13. (if (= @language "english")
  14.    (
  15.    (set def_catch 0)
  16.    (set def_hlpch 1)
  17.    (set #choosedest "Select destination\n(a drawer will be created)")
  18.    (set #choosedesthelp (cat "Select the directory PDBase will be copied to.\n"
  19.                              "Note: a sub-directory will be created.\n\n"))
  20.    (set #choosecat "Which catalogs shall I install?")
  21.    (set #choosehelp "Which help files shall I install?")
  22.    (set #choosecat_hlp (cat  "If you run system 2.1 or better,"
  23.                               "you should install your prefered language."))
  24.    (set #whereicon "Do you wish to install PDBase project icon?")
  25.    (set #whereicon_hlp (cat "PDBase offers you the possibility to add an icon "
  26.                            "to each database you save.\n"
  27.                            "The icon file will be located in ENV:PDBase/def_PDBase.info"))
  28.    )
  29. )
  30.  
  31. (if (= @language "français")
  32.    (
  33.    (set def_catch 1)
  34.    (set def_hlpch 2)
  35.    (set #choosedest "Choisir la destination\n(un répertoire sera créé)")
  36.    (set #choosedesthelp (cat "Choisissez la destination vers laquelle PDBase sera copié.\n"
  37.                              "Note: un sous-répertoire sera créé.\n\n"))
  38.    (set #choosecat "Quels catalogues dois-je installer?")
  39.    (set #choosehelp "Quels fichiers d'aide dois-je installer?")
  40.    (set #choosecat_hlp (cat  "Si vous utilisez le système 2.1 ou plus,"
  41.                               "vous devriez choisir votre langage préféré."))
  42.    (set #whereicon "Voulez-vous installer l'icone de projet PDBase?")
  43.    (set #whereicon_help (cat "PDBase vous offre la possibilité de créer une icone "
  44.                             "pour chaque base que vous sauvegardez.\n"
  45.                             "L'icone se trouvera dans ENV:PDBase/def_PDBase.info"))
  46.    )
  47. )
  48.  
  49.  
  50.  
  51. ;--- Setup ---
  52.  
  53. (set sourcePath (expandpath (pathonly @icon)))
  54. (set sourcePath (pathonly sourcePath))
  55.  
  56.  
  57. ;----- Ask for destination --------
  58.  
  59. (set @default-dest   (askdir  (prompt #choosedest)
  60.                               (default @default-dest)
  61.                               (help (cat #choosedesthelp
  62.                                           @askdir-help))
  63.                      )
  64. )
  65.  
  66.  
  67.  
  68. ;---- Create PDBase directory and Help subdirectory -------
  69.  
  70. (makedir (tackon @default-dest "PDBase") (infos))
  71. (set @default-dest (tackon @default-dest "PDBase"))
  72. (makedir (tackon @default-dest "Help"))
  73. (copyfiles (source sourcePath)
  74.            (pattern "Help.info")
  75.            (dest @default-dest))
  76.  
  77.  
  78. ; Copy programs
  79.  
  80. (copyfiles  (source sourcePath)
  81.             (pattern "~(Install#?)" )
  82.             (dest @default-dest)
  83.             (infos)
  84.             (files)
  85. )
  86.  
  87.  
  88.  
  89. ;-------- Ask for catalogs --------
  90.  
  91. (set catch  (askoptions (prompt #choosecat)
  92.                         (choices "français")
  93.                         (default def_catch)
  94.                         (help #choosecat_hlp))
  95. )
  96.  
  97. ;----- Ask for documentation ------
  98.  
  99. (set hlpch  (askoptions (prompt #choosehelp)
  100.                         (choices "english" "français")
  101.                         (default def_hlpch)
  102.                         (help ""))
  103. )
  104.  
  105. ;----- Ask for Icon ---------
  106.  
  107. (set iconch (askbool (prompt #whereicon)
  108.                      (default 1)
  109.                      (help #whereicon_hlp))
  110. )
  111.  
  112. ;----- Copy catalogs, help files, and icon -----
  113.  
  114. (if (BITAND catch 1) (copyfiles (source (tackon sourcePath "catalogs"))
  115.                                  (dest (tackon @default-dest "catalogs"))
  116.                                  (pattern "français"))
  117. )
  118.  
  119.  
  120. (if (BITAND hlpch 1) (copyfiles (source (tackon sourcePath "Help"))
  121.                                  (pattern "English")
  122.                                  (dest (tackon @default-dest "Help"))
  123.                                  (infos))
  124. )
  125.  
  126. (if (BITAND hlpch 2) (copyfiles (source (tackon sourcePath "Help"))
  127.                                  (pattern "Français")
  128.                                  (dest (tackon @default-dest "Help"))
  129.                                  (infos))
  130. )
  131.  
  132. (if (= iconch 1)
  133.    (
  134.       (copyfiles (source   (tackon sourcePath "icon")
  135.                            (pattern "PDBase")
  136.                            (dest "ENVARC:")
  137.                            (infos))
  138.       )
  139.       (copyfiles (source   (tackon sourcePath "icon")
  140.                            (pattern "PDBase")
  141.                            (dest "ENV:")
  142.                            (infos))
  143.       )
  144.       (tooltype (dest "ENVARC:PDBase/def_PDBase")
  145.                 (setdefaulttool (tackon @default-dest "PDBase"))
  146.       )
  147.       (tooltype (dest "ENV:PDBase/def_PDBase")
  148.                 (setdefaulttool (tackon @default-dest "PDBase"))
  149.       )
  150.    )
  151. )
  152.  
  153.